//
//  SCIntegralConfirmCell.m
//  shangcheng
//
//  Created by 张艳江 on 2019/6/10.
//  Copyright © 2019 张艳江. All rights reserved.
//

#import "SCConfirmGoodsCell.h"

@implementation SCConfirmGoodsCell

- (void)awakeFromNib {
    [super awakeFromNib];
    
    self.goodsImage.contentMode = UIViewContentModeScaleToFill;
    self.goodsImage.clipsToBounds = YES;
}

- (void)setModel:(SCModel *)model{
    _model = model;
    [self.goodsImage sd_setImageWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@%@",Goods_ImageURL,model.wap_pic]] placeholderImage:[UIImage imageNamed:@""]];
    
    if (model.gift_id != nil) {
        self.goodsNameLab.text = model.gift_name;
        self.priceLab.text = model.payment_pure_integral;
        self.specsLab.text = model.specification;
    }else{
        self.goodsNameLab.text = model.goods_name;
        self.priceLab.text = [NSString stringWithFormat:@"¥%@",[MyTool removeFloatAllZeroByString:model.goods_price]];
        self.specsLab.text = model.spec;
        self.jifenIcon.hidden = YES;
        self.price_left.constant = 10;
    }
    self.numLab.text = [NSString stringWithFormat:@"x%@",model.num];
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];
    // Configure the view for the selected state
}

@end
